#include <bits/stdc++.h>

#define ll long long
#define ull unsigned long long
#define uint unsigned int

#define YES cout << "YES" << '\n'
#define NO cout << "NO" << '\n'
#define endl '\n'
const int INF = 1e9;
const int MOD = 998244353;
using namespace std;

/*思考

*/

void solve() {
    uint n, c;
    cin >> n >> c;
    vector<uint> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    sort(a.begin(), a.end());
    if (a[0] > c) {
        cout << n << endl;
        return;
    }
    int k = 1;
    int ans = 0;
    for (int i = n - 1; i >= 0; i--) {
        uint num = a[i] * k;
        if (num <= c) {
            k = k << 1;
        } else {
            ans++;
            continue;
        }
    }
    cout << ans << endl;
}

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    int t = 0;
    cin >> t;
    while (t--) solve();
    return 0;
}